//index.js
//获取应用实例
const App = getApp()
Page({
  data: {noticeInfo:null },
  onLoad(options){
    this.setData(options, () => {
      this.getNoticeInfo(options.id);
    })
  },
  //获取公告详情
  getNoticeInfo(id){
    return new Promise((resolve, reject) => {
      App._get('Site/Api004', {}, (res) => {
        let noticeInfo = res.items.find(item => item.id = id)
        this.setData({noticeInfo}, () => {
          resolve()
        })
      })
    })
  }
})
